<<<<<<< HEAD
import {ReqGetBaseCategoryList,ReqGetSliceList,ReqGetFloorList} from "@/api"
=======
import {ReqGetBaseCategoryList,ReqGetSlice,ReqGetFloor} from "@/api"
>>>>>>> three

export default {
    namespaced:true,
    state:{
<<<<<<< HEAD
        categoryList:[],
        slice:[],
        floor:[]
=======
        categoryList:[],        // 三级列表
        slice:[],           // 轮播图
        floor:[]            // 楼层
>>>>>>> three
    },
    mutations:{
        SAVE_CATEGORY_LIST(state,value){
            state.categoryList = value.slice(0,15)
        },
        SAVE_SLICE_LIST(state,value){
            state.slice = value
        },
        SAVE_FLOOR_LIST(state,value){
            state.floor = value
        }
    },
    actions:{
        // 异步获取数据
        async GetCategoryList({commit}){
            let data = await ReqGetBaseCategoryList()
            commit("SAVE_CATEGORY_LIST",data)
        },
        async GetSliceList({commit}){
<<<<<<< HEAD
            let data = await ReqGetSliceList()
            commit("SAVE_SLICE_LIST",data)
        },
        async GetFloorList({commit}){
            let data = await ReqGetFloorList()
=======
            let data = await ReqGetSlice()
            commit("SAVE_SLICE_LIST",data)
        },
        async GetFloorList({commit}){
            let data = await ReqGetFloor()
>>>>>>> three
            commit("SAVE_FLOOR_LIST",data)
        }
    },
    getters:{
        
    }
}